package com.ruoyi.blog.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 博客文章业务对象 blog_article
 *
 * @author ruoyi
 * @date 2023-10-01
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class BlogArticleBo extends BaseEntity {

    /**
     * 博客文章id
     */
    @NotBlank(message = "博客文章id不能为空", groups = { EditGroup.class })
    private String articleId;

    /**
     * 博客分类id
     */
    @NotNull(message = "博客分类id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categoryId;

    /**
     * 博客文章标题
     */
    @NotBlank(message = "博客文章标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 博客正文
     */
    @NotBlank(message = "博客正文不能为空", groups = { AddGroup.class, EditGroup.class })
    private String context;

    /**
     * 是否置顶
     */
    @NotNull(message = "是否置顶不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer topping;

    /**
     * 浏览量
     */
    private Long browse;

    /**
     * 是否显示
     */
    @NotNull(message = "是否显示不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer isShow;

    /**
     * 标签id
     */
    @NotNull(message = "标签id不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<Long> labelIds;
}
